<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title><?php echo $title; ?></title>
</head>
<body>
    <table style="font-family: Verdana,sans-serif; font-size: 12px; color: #374953; width: 600px;">
        <tbody>
            <tr style="background-color: #FFF;">
                <td align="center" colspan="3"><h2 style="font-size:16px;">Produkter er lave lager</h2></td>
            </tr>
            <tr style="background-color: #CCCCCC;">
                <td align="center">ID</td>
                <td align="center">Navn</td>
                <td align="center">Antal</td>                
            </tr>
            <?php foreach($products as $product){ ?>
                <tr style="background-color: #EEEEEE;">
                    <td align="left" style="padding-left:10px;"><?php echo $product['sku']; ?></td>
                    <td align="left" style="padding-left:10px;">
                        <?php echo $product['name']; ?>
                        <?php if($product['options']){ ?>                               
                            <?php foreach($product['options'] as $option){ ?>
                                <div>
                                    <p style="color:#0000FF; font-size:11px; font-weight:bold; padding:0; margin: 5px 0 0 0;"><?php echo $option['name']; ?></p>
                                    <div style="padding-left:10px;">
                                        <?php foreach($option['option_value'] as $option_value){ ?>
                                            <small style="color:#0000FF; font-size:11px;">&nbsp;&nbsp;&nbsp;<?php echo $option_value['name'] . ':&nbsp;&nbsp;' . $option_value['quantity']; ?></small><br />
                                        <?php } ?>    
                                    </div>
                                </div>                             
                            <?php } ?>
                        <?php } ?>
                    </td>
                    <td align="right" style="padding-right:10px;"><?php echo $product['quantity']; ?></td>    
                </tr>
            <?php } ?>
        </tbody>
    </table>
</body>
